﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Model.Sys.Enum
{
    public class Constant
    {
        /// <summary>
        /// 站点配置文件物理路径
        /// </summary>
        public static string SiteConfigPhysicalPath
        {
            get
            {
                return HttpContext.Current.Server.MapPath("/Configuration/SiteConfig.config");
            }
        }
        /// <summary>
        /// 权限配置文件路径
        /// </summary>
        public static string PowerConfigPath
        {
            get
            {
                return HttpContext.Current.Server.MapPath("/Configuration/PowerConfig.config");
            }
        }
        /// <summary>
        /// 商户权限配置文件路径
        /// </summary>
        //public static string StoreActionPath = HttpContext.Current.Server.MapPath("/Configuration/StoreAction.config");

        /// <summary>
        /// 站点缓存键集合
        /// </summary>
        public static class CacheKey
        {
            /// <summary>
            /// 站点信息缓存key
            /// </summary>
            public static string SiteConfigCacheKey
            {
                get
                {
                    return "DIARYLIFE_SITE_CONFIG";
                }
            }
            /// <summary>
            /// 权限信息缓存key
            /// </summary>
            public static string PowerConfigCacheKey 
            {
                get
                {
                    return "CACHE_POWER_CONFIG";
                }
            }
            /// <summary>
            /// UserInfo信息缓存key
            /// </summary>
            public static string LoginUserInfoCacheKey
            {
                get
                {
                    return "DIARYLIFE_LOGIN_USERINFO";
                }
            }
            /// <summary>
            /// 会员信息缓存key
            /// </summary>
            //public static string LoginMemberInfoCacheKey = "CACHE_LOGIN_MEMBER";

            public static Dictionary<string, string> List = new Dictionary<string, string>();
            static CacheKey()
            {
                List.Add(SiteConfigCacheKey, "站点信息缓存");
                //List.Add(PowerConfigCacheKey, "权限信息缓存");
                //List.Add(LoginAdminInfoCacheKey, "管理员信息缓存");
                //List.Add(LoginMemberInfoCacheKey, "会员信息缓存");
            }
        }
    }
}
